// random
// [1, max]
// [min, max]
export function random(min, max) {
  var r = 0;
  switch(arguments.length){
    case 1:
      r = Math.ceil(Math.random()*min);
      break;
    case 2:
      if (min >= max){
        return;
      }
      r = Math.floor(Math.random()*(max - min + 1) + min);
      break;
    default:
      break;
  }
  return r;
};